メッセージ履歴の Undo/Redo UI 追加#27
Merged
Merged
Conversation
- Add unrevertSession() to OpenCodeConnection (session.unrevert SDK call) - Add undoSession/redoSession message types to WebviewToExtMessage - Add undoSession handler: revert session → send activeSession + messages - Add redoSession handler: unrevert session → send activeSession + messages Closes #9
- Add UndoIcon / RedoIcon SVG components - Add onUndo, onRedo, canUndo, canRedo, isBusy props to ChatHeader - Show undo/redo buttons when activeSession exists and not in child session - Add handleUndo: extract user message text → setPrefillText → revert - Add handleRedo: clear prefillText → unrevert - Add canUndo / canRedo computed flags - Stabilize handleEvent with activeSessionRef to prevent useEffect churn - Add header.undo / header.redo locale keys (en/ja)
- Add ChatHeader undo/redo button tests (render, disabled, click, visibility) - Add scenario 20: undo/redo lifecycle test covering undo → prefillText restoration, redo → prefillText clear, disabled states, and busy states
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
チャットヘッダーに Undo/Redo ボタンを追加し、直前のアシスタント応答を取り消したり、取り消しを元に戻せるようにした。
Undo 時にはユーザーメッセージのテキストを入力欄に復元し、何が取り消されたか分かるようにしている。
Related Issue
Closes #9
Changes
unrevertSession()メソッドを追加(session.unrevert()呼び出し)undoSession/redoSessionメッセージ型とハンドラを追加UndoIcon/RedoIconSVG コンポーネントを追加ChatHeaderに Undo/Redo ボタンを追加(セッションあり・子セッション以外で表示)handleUndo: ユーザーメッセージのテキストをprefillTextに復元してからrevert実行handleRedo:prefillTextをクリアしてからunrevert実行activeSessionRefを導入しhandleEventを安定化(パフォーマンス改善)header.undo/header.redoロケールキーを追加(en/ja)Checklist
npm run buildpassesnpm testpasses